﻿<%@ Page Title="" Language="C#" MasterPageFile="~/hvtadmin/AdminMuban/PanelMuban.Master" AutoEventWireup="true" CodeBehind="PanelUserList.aspx.cs" Inherits="HoverTreeMobile.HvtAdmin.PanelUserList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HvtHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HoverTreeCPH" runat="server">
     <asp:Repeater runat="server" ID="rptList">
        <HeaderTemplate><table></HeaderTemplate>
        <ItemTemplate><tr><td><a href="paneluseralter.aspx?hvtid=<%#((HoverTree.Model.PanelUserInfo)Container.DataItem).HvtId.ToString() %>"><%#HttpUtility.HtmlEncode(((HoverTree.Model.PanelUserInfo)Container.DataItem).Hvtusername) %></a></td>
            <td><a href="javascript:HvtDeal(<%#((HoverTree.Model.PanelUserInfo)Container.DataItem).HvtId.ToString() %>)" target="_self">删除</a></td>
                      </tr></ItemTemplate>
        <FooterTemplate></table></FooterTemplate>
    </asp:Repeater>

    <script type="text/javascript">
        function HvtDeal(hvtid) {
            if (!confirm("确定删除吗？"))
            { return; }

            $.ajax({
                type: "Post",
                url: "paneluserlist.aspx/Delete",
                //方法传参的写法一定要对
                data: "{'hvtid':'"+hvtid+"'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    //返回的数据用data.d获取内容
                    if (data.d == '')
                        location.reload();
                    else
                        alert(data.d);
                },
                error: function (err) {
                    alert(err);
                }
            });
        }
        </script>
</asp:Content>
